<template>
<div>
  <table border="1" cellspacing="0" align="center">
    <tr>
      <td>店主</td>
      <td>名称</td>
      <td>价格</td>
      <td>描述</td>
      <td>图片</td>
    </tr>
    <tr v-for="i in shoplist">
      <td>{{i.shopkeeper.name}}</td>
      <td>{{i.name}}</td>
      <td>{{i.price}}</td>
      <td>{{i.account}}</td>
      <td><img :src="'http://localhost:8000'+i.picture" alt="" width="200px" height="200px"></td>
    </tr>
  </table>
  <br>


</div>
</template>

<script>
export default {
name: "show_shops",
  data(){
    return{
      shoplist:{},
    }
  },
  methods:{
  get_shoplist(){
    this.$axios.get('users/shop/')
    .then(res=>{
      this.shoplist=res.data.list
    })
  },
  },
  mounted() {
    this.get_shoplist()
  }
}
</script>

<style scoped>

</style>
